<?php
namespace app\publics\controller\api;
use app\ApiController;

use app\mainadmin\model\AreasModel;


/*------------------------------------------------------ */
//-- 区域信息获取
/*------------------------------------------------------ */
class Areas extends ApiController
{
	/*------------------------------------------------------ */
	//-- 优先执行
	/*------------------------------------------------------ */
	public function initialize(){
        parent::initialize();
        $this->Model = new AreasModel();
    }
	/*------------------------------------------------------ */
	//-- 加载区域信息
	/*------------------------------------------------------ */
 	public function getList(){
		$pid = input('pid','000000','intval');
        if($pid == '100000'){
            $pid = '000000';
        }

		$data['code'] = 1;
		$data['list'] = $this->Model->getBySel($pid);
		return $this->ajaxReturn($data);
	}


}
